package com.liuwei.service;

import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.liuwei.dao.ClienteRepository;
import com.liuwei.model.Cliente;

@Service
public class EslServiceImpl implements EslService {
	@Autowired
	private ClienteRepository clienteDao;

	private static final org.slf4j.Logger LOG = LoggerFactory.getLogger(EslServiceImpl.class);

	@Override
	public Cliente findCliente(String id) {

		Cliente c = new Cliente();
		c.setId("liuwei");
		c.setAccount_number(333);
		clienteDao.save(c);
		Cliente cliente = clienteDao.findOne(id);
		LOG.info(" get cliente by id {} is {}", id, cliente);
		return cliente;
	}
}